package com.xxd.rpt3.service.impl;

import com.xxd.rpt3.Entity.Department;
import com.xxd.rpt3.repository.DepartmentRepository;
import com.xxd.rpt3.service.DepartmentService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
class DepartmentImpl implements DepartmentService {
	@Autowired
	DepartmentRepository departmentRepository;

	@Override
	public Department getById(int id) {
		return departmentRepository.getOne(id);
	}

	@Override
	public List<Department> findAll() {
		return departmentRepository.findAll();
	}
}
